<template>
  <div id="register">
    <LoginWp>
      <Login-container slot="login-container">
        <h4 slot="dl"></h4>
        <h4 slot="zs"></h4>
        <van-field
          slot="re-psw"
          class="bk"
          v-model="password"
          type="password"
          name="密码"
          placeholder="请再次输入密码确认"
          :rules="[{ required: true, message: '请填写密码' }]"
        />
        <div slot="ph-yzm" class="ph-yzm">
          <van-field v-model="sms" center clearable placeholder="短信验证码">
          </van-field>
          <van-button type="primary" class="get-yzm">获取验证码</van-button>
        </div>
        <div slot="agree-login" class="agree-login">
          <van-checkbox v-model="checked">
            我已阅读并同意《礼拜五用户协议》
            <template #icon="props">
              <img
                class="img-icon"
                :src="props.checked ? activeIcon : inactiveIcon"
              />
            </template>
          </van-checkbox>
        </div>
        <div slot="bt"></div>
      </Login-container>
    </LoginWp>
  </div>
</template>

<script>
import LoginWp from './loginWp.vue';
import LoginContainer from './loginContainer.vue';
export default {
  name: 'register',
  data() {
    return {
      username: '',
      password: '',
      checked: false,
      sms: '',
      activeIcon: require('./act.png'),
      inactiveIcon: require('./inact.png'),
    };
  },
  methods: {},
  mounted() {
    document.querySelector('.search-wp h3').innerText = '会员注册';
  },
  components: {
    LoginWp,
    LoginContainer,
  },
};
</script>

<style scoped>
::v-deep.ph-yzm {
  margin-top: -20px;
  margin-bottom: 14px;
  position: relative;
}
::v-deep.get-yzm {
  position: absolute;
  width: 110px;
  height: 32px;
  font-size: 14px;
  line-height: 32px;
  top: 26px;
  right: 10px;
  background-color: #498e3d;
  border: 0;
}
</style>
